//
//  GKZYUserForgetPasswordView.m
//  GKZYAid
//
//  Created by lanou3g on 16/3/14.
//  Copyright © 2016年 GKZYAid. All rights reserved.
//

#import "GKZYUserForgetPasswordView.h"

#define LTVIEW_X ((self.frame.size.width) * 0.15)
#define LTVIEW_WIDTH ((self.frame.size.width) * 0.7)
#define LTVIEW_HEIGHT ((self.frame.size.height) * 0.05)
#define GAP ((self.frame.size.height)  * 0.03)

@implementation GKZYUserForgetPasswordView

- (id)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        [self addAllViews];
    }
    return self;
}

- (void)addAllViews
{
    self.backgroundColor = [UIColor whiteColor];
    
    self.userName = [[LabelTextFieldView alloc] initWithFrame:CGRectMake(LTVIEW_X, self.frame.size.height * 0.1 + 44, LTVIEW_WIDTH, LTVIEW_HEIGHT)];
    [self addSubview:self.userName];
    [self.userName setLabelText:@"用户名:" textFieldPlaceholder:@"请输入用户名" isCiphertext:NO textFieldTag:201];
    self.userMail = [[LabelTextFieldView alloc] initWithFrame:CGRectMake(LTVIEW_X, CGRectGetMaxY(self.userName.frame) + GAP, LTVIEW_WIDTH, LTVIEW_HEIGHT)];
    [self addSubview:self.userMail];
    [self.userMail setLabelText:@"邮箱:" textFieldPlaceholder:@"请输入邮箱" isCiphertext:NO textFieldTag:202];
    
    self.buttonSure = [UIButton buttonWithType:UIButtonTypeCustom];
    self.buttonSure.frame = CGRectMake(LTVIEW_X, CGRectGetMaxY(self.userMail.frame) + GAP * 1.5, LTVIEW_WIDTH, LTVIEW_HEIGHT * 1.2);
    self.buttonSure.backgroundColor = [UIColor orangeColor];
    [self.buttonSure setTitle:@"发送邮件" forState:UIControlStateNormal];
    [self addSubview:self.buttonSure];
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
